package com.tuanbiao.presenter.setting;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.OnLifecycleEvent;

import com.tuanbiao.base.mvp.BasePresenter;
import com.tuanbiao.controllers.SettingController;

/**
 * @author abiao
 * @since 2022/4/18 9:29
 */
public class SettingDeviceInfoPresenter extends BasePresenter<SettingController.Model, SettingController.DeviceInfoView> implements SettingController.DeviceInfoPresenter {

    public SettingDeviceInfoPresenter(SettingController.Model model, SettingController.DeviceInfoView rootView) {
        super(model, rootView);
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void init() {
        mModel.getDeviceInfo(entity -> mRootView.showDeviceInfo(entity));
    }
}
